package day8;

/**
 * @author oldliu
 * @since 1.0
 */
public class PrintThread2 implements Runnable {
    private String name;
    public PrintThread2(String n){
        this.name=n;
    }
    @Override
    public void run() {
        for (int i = 1; i <=20 ; i++) {
            System.out.println(name+" print :"+i);
            try {
                Thread.sleep((long) (Math.random()*50));
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
